runOrLogException

inline fun <R> runOrLogException(finally: () -> Unit = {}, flush: Boolean = true, block: () -> R): Result<R>

Runs block, logging (as logger.error) any exceptions that are not caught within block.

Runs finally in the try-catch's finally block. If flush is true, prints a newline in the finally block.

Sources

js source
Link copied to clipboard